﻿@inject DialogService DialogService

<div class="rz-p-12 rz-text-align-center">
    <RadzenButton Text="Dialog with inline Blazor content" ButtonStyle="ButtonStyle.Secondary" Click=@ShowInlineDialog />
</div>

@code {
    int orderID = 10248;

    async Task ShowInlineDialog()
    {
        var result = await DialogService.OpenAsync("Simple Dialog", ds =>
        @<RadzenStack Gap="1.5rem">
            <p>Confirm Order ID <b>@orderID</b>?</p>
            <RadzenStack Orientation="Orientation.Horizontal" Gap="0.5rem" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.SpaceBetween">
                <RadzenStack Orientation="Orientation.Horizontal">
                    <RadzenButton Text="Ok" Click="() => ds.Close(true)" Style="width: 80px;" />
                    <RadzenButton Text="Cancel" Click="() => ds.Close(false)" ButtonStyle="ButtonStyle.Light" />
                </RadzenStack>
                <RadzenButton Text="Refresh" Click="(() => { orderID = 10249; ds.Refresh(); })" ButtonStyle="ButtonStyle.Light" />
            </RadzenStack>
        </RadzenStack>);
    }
}